-- GENERATED SPELL FOR [Nerubis Guard] --


function spell0_16313(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16313', 30000, 1)
end

function spell1_16313(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13584,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16313', 514, 1)
end

function spell2_16313(pUnit, Event) --@Wither Strike,n/a--
pUnit:FullCastSpellOnTarget(28887,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16313', 4307, 1)
end

function Sorts_16313(pUnit, Event)
local choix_sorts_16313 = math.random(0, 2)
if choix_sorts_16313 == 0 then
pUnit:RegisterEvent('spell0_16313', 1, 1)
end
if choix_sorts_16313 == 1 then
pUnit:RegisterEvent('spell1_16313', 1, 1)
end
if choix_sorts_16313 == 2 then
pUnit:RegisterEvent('spell2_16313', 1, 1)
end
end

function mob16313_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16313', math.random(1500, 3000), 1)
end

function mob16313_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16313_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16313_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16313, 1, 'mob16313_Action')
RegisterUnitEvent(16313, 2, 'mob16313_Leave')
RegisterUnitEvent(16313, 3, 'mob16313_Kill')
RegisterUnitEvent(16313, 4, 'mob16313_Die')
